Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Next.js to v13 - Part I #5402

Open
wants to merge 29 commits into
base: develop
Choose a base branch
from
Open

Upgrade Next.js to v13 - Part I #5402

wants to merge 29 commits into from

Conversation

nabramow
Copy link
Collaborator

@nabramow nabramow commented Dec 28, 2024

Part 1 of the Next.js v13 upgrade. I will break this into two. This is doing the minimum to upgrade, which includes keeping some legacy behavior. The pages folder system will also be merged into the app folder and a lot of config will change. This version supports both ways. In part 2 I will change to new structure.

Migration Guide:
https://nextjs.org/docs/pages/building-your-application/upgrading/version-13

I needed to upgrade these packages as well for this:

  • i18next
  • next-i18next
  • react-i18next
  • @sentry/nextjs
  • @sentry/react
  • sentry-testkit

This means you'll want to pay attention to translations and sentry while testing.

Web frontend checklist

  • [ x ] Formatted my code with yarn format
  • [ x ] There are no warnings from yarn lint --fix
  • There are no console warnings when running the app
  • [ x ] All tests pass
  • [ x ] Clicked around my changes running locally and it works
  • [ x ] Checked Desktop, Mobile and Tablet screen sizes

Copy link

vercel bot commented Dec 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
couchers ✅ Ready (Inspect) Visit Preview Jan 4, 2025 7:43am

Comment on lines -48 to +49
//sentry testing was causing OOM for some reason
//const { testkit, sentryTransport } = sentryTestkit();
//global.testKit = testkit;
const { testkit } = sentryTestkit();
global.testKit = testkit;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Their next upgrade was focused mostly on performance and reducing bundle size so my guess was the OOM was happening due to that.

Comment on lines -3 to -5
import { TFunction } from "i18n";
import { StringMap, TOptions } from "i18next";
import i18n from "test/i18n";
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They stopped exposing StringMap purposely (says in their docs). I tried to re-write this function but it was getting pretty gnarly, which is why I decided to just use the test instance of i18n in the tests and use the t function from there rather than mocking a separate one.

@nabramow nabramow marked this pull request as ready for review January 4, 2025 06:49
@nabramow nabramow marked this pull request as draft January 4, 2025 06:55
Copy link
Contributor

@jesseallhands jesseallhands left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find any issues during testing. The only issue I encountered I think is unrelated to this PR:

Sending a request with a duration of over 1 year clears both dates AND clears the request message you typed (the entire text is deleted). This would really suck if you typed a long request:
image

@nabramow
Copy link
Collaborator Author

nabramow commented Jan 4, 2025

I couldn't find any issues during testing. The only issue I encountered I think is unrelated to this PR:

Sending a request with a duration of over 1 year clears both dates AND clears the request message you typed (the entire text is deleted). This would really suck if you typed a long request: image

Oh interesting but yeah that's unrelated let me throw that in another ticket here: #5432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants